﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    主页
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        当前移除的队列元素是:
        <%: ViewData["pop"] %></h2>
    <p>
        <%=Html.ActionLink("刷新","Index") %>
    </p>
    <%using (Html.BeginForm())
      {
    %>
    用户：<%=Html.TextBox("UserID") %><br />
    信息：<%=Html.TextArea("Chat") %><br />
    返回记录从<%=Html.TextBox("Start") %>到<%=Html.TextBox("End") %>条记录
    <input type="submit" />
    <%
      } %>
    <hr />
    <h1>
        KV存储</h1>
    <ul>
        <%
            List<MvcApplication1.Models.ChatModels> model = ViewData["ChatList"] as List<MvcApplication1.Models.ChatModels>;
            if (model != null && model.Count > 0)
            {
                foreach (var i in model)
                { 
        %>
        <li>
            <%=i.UserID%>......<%=i.Chat%></li>
        <%
                }
            }%>
    </ul>
    <h1>
        <hr />
    </h1>
    消息队列服务
    <ul>
        <%
            List<MvcApplication1.Models.ChatModels> MSMQ = ViewData["MSMQ"] as List<MvcApplication1.Models.ChatModels>;
            if (MSMQ != null && MSMQ.Count > 0)
            {
                foreach (var i in MSMQ)
                { 
        %>
        <li>
            <%=i.UserID%>......<%=i.Chat%></li>
        <%
                }
            }%>
    </ul>
</asp:Content>
